#include <bits/stdc++.h>
using namespace std;

// 大数乘法
string multiply(string a, int n){
    string res;
    int carry = 0, pot;
    for(int i = a.size() - 1; i >= 0; --i) {
        pot = (a[i] - '0') * n + carry;
        carry = pot / 10;
        pot = pot % 10;
        res += ('0' + pot);
    }

    while(carry != 0){
        res += '0' + (carry % 10);
        carry /= 10;
    }
    reverse(res.begin(), res.end());
    return res;
}

int main(){
    string s;
    cin >> s;
    int l = s.size(), cnt = 0;
    string ss = s + s;
    for(int i = 1; i <= l; ++i){
        string t = multiply(s, i);
        if((int)t.size() > l) break;
        if(ss.find(t) == string::npos){
            continue;
        }else{
            ++cnt;
        }
    }
    cout << (cnt == l ? "Yes" : "No") << endl;
    return 0;
}